<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>

<script type="text/javascript">
	(function() {
		var bar = $('.bar');
		var percent = $('.percent');
		var status = $('#status');

		$('form').ajaxForm({
			beforeSend : function() {
//				alert("Before send");
				status.empty();
				status.html('<p> Sending data to server </p>');
				/*var percentVal = '0%';
				bar.width(percentVal)
				percent.html(percentVal); */
			},
			/*uploadProgress : function(event, position, total, percentComplete) {
				var percentVal = percentComplete + '%';
				bar.width(percentVal)
				percent.html(percentVal);
			}, */
			complete : function(xhr) {
				//alert("complete");
				status.html(xhr.responseText);
			}
		});
	})();

</script>


<div id="settingstab" class="wrap">
			<s:form action="epp_server_settings" name="epp_server_settings"
				method="POST" enctype="multipart/form-data">
				<s:textfield label="EPPD Friendly Name" name="eppdFriendlyname"
					maxlength="15"></s:textfield>
				<s:textfield label="EPPD Ip address" name="ipAddress" maxlength="15"></s:textfield>
				<s:textfield label="EPPD Port Number" name="portNumber"
					maxlength="4"></s:textfield>
				<s:textfield label="Username" name="username" maxlength="10"></s:textfield>
				<s:password label="Password" name="password" maxlength="10"
					required="true"></s:password>
				<s:file label="X.509 Certificate PCKS2" name="pcks"></s:file>
				<s:file label="X.509 Certificate JKS- A" name="jks"></s:file>
				<button>Save Settings</button>
			</s:form>

			<div id="results"></div>
			<div id="status"></div>
</div>